export const tableConfig = {
  blockTitle: '页面关联的字典',
  fields: [
    { id: '001', prop: 'menuName', label: '菜单项', width: '160' },
    { id: '002', prop: 'scenarioName', label: '关联页面名称', width: '160' },
    { id: '003', prop: 'roles', label: '权限', width: '160' },
    { id: '004', prop: 'isLock', label: '是否停用', width: '100', align: 'center' },
    {
      id: '007',
      label: '操作',
      width: '148',
      items: [
        {
          id: '01',
          type: 'button',
          opt: {
            type: 'warning',
            text: '停用',
            action: 'lockMenu',
          },
        },
        {
          id: '02',
          type: 'button',
          opt: {
            type: 'danger',
            text: '移除',
            action: 'removeMenu',
          },
        },
      ],
    },
  ],
}

export const formConfig = {
  blockTitle: '应用发布信息',
  tableName: 'appMenuList',
  groups: [
    {
      fields: [
        { id: '001', model: 'id', label: '菜单编号', width: '', type: 'input', disabled: 'Y' },
        { id: '011', model: 'appId', label: '应用编号', width: '', type: 'input', disabled: 'Y' },
        { id: '002', model: 'menuName', label: '菜单名称', width: '', type: 'input' },
        {
          id: '004',
          model: 'scenarioId',
          label: '关联页面',
          width: '',
          type: 'select',
          isAsyncOpt: true,
          rules: [{ required: true, message: '必填项', trigger: 'blur' }],
        },
        { id: '005', model: 'roles', label: '角色权限', width: '', type: 'input' },
        { id: '006', model: 'isLock', label: '停用', width: '', type: 'switch', opt: { activeValue: 'Y', inactiveValue: 'N' } },
      ],
    },
  ],
}
